package com.example.lib.score;

public class Score implements Comparable<Score>{
    private String userName;
    private int score;
    private boolean gameOverFlag;

    public Score() {
    }

    public Score(String userName, int score,boolean gameOverFlag) {
        this.userName = userName;
        this.score = score;
        this.gameOverFlag = gameOverFlag;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public boolean isGameOverFlag() {
        return gameOverFlag;
    }

    public void setGameOverFlag(boolean gameOverFlag) {
        this.gameOverFlag = gameOverFlag;
    }

    @Override
    public int compareTo(Score o) {
        return  o.score - this.score;
    }
}
